package com.jjyu.controller;

import com.jjyu.service.RecommendationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/recommendations")
public class RecommendationController {

    @Autowired
    private RecommendationService recommendationService;

    @PostMapping("/random")
    public Map<String, Object> getRandomRecommendation(@RequestParam int userId) {
        return recommendationService.getRandomRecommendation(userId);
    }
}
